<template>
  <div class="cart-list">
    <scroll class="content" ref="scroll">
      <category-list-item v-for="(item, index) in scList" :key="index" :item="item"></category-list-item>
    </scroll>
  </div>
</template>

<script>
import Scroll from '@/components/common/scroll/Scroll.vue'

import CategoryListItem from './CategoryListItem.vue'

import { mapGetters } from 'vuex'

export default {
  name: 'CartList',
  data() {
    return {

    }
  },
  components: {
    Scroll,
    CategoryListItem
  },
  computed: {
    ...mapGetters(['scList'])
  },
  activated() {
    this.$refs.scroll.refresh()
  }
}
</script>

<style  scoped>
.cart-list {
  height: calc(100vh - 44px - 49px - 40px);
}

.content {
  height: 100%;

  /* 清除浮动 */
  overflow: hidden;
}
</style>